/*
 * @Author: thinker_cy
 * @Date: 2025-11-03 17:13:32
 * @FilePath: \weimai-admin\src\router\index.js
 * @Description: 
 */
import { createWebHashHistory, createRouter } from "vue-router"; 

import Layout from '@/layout/Layout.vue';

import Index from '@/pages/index/index.vue';
import Login from '@/pages/login/index.vue';
// 文章管理
import Article from '@/pages/article/index.vue';
// 招聘信息
import HireInfo from '@/pages/hireinfo/index.vue';
// 首页板块
import MainPart from '@/pages/mainpart/index.vue';
// 团队介绍
import TeamsInfo from '@/pages/teamsinfo/index.vue';

const routes = [
  {
    path: "/",
    name: "Home",
    component: Layout,
    children: [
      {
        path: "",
        name: "Dashboard",
        redirect: "/about/banner"
      },
      {
        path: "about",
        name: "About",
        children: [
          {
            path: "banner",
            name: "AboutBanner",
            component: Article,
            meta: { type: 3 }
          },
          {
            path: "content",
            name: "AboutContent",
            component: Article,
            meta: { type: 4 }
          },
          {
            path: "milestone",
            name: "AboutMilestone",
            component: Article,
            meta: { type: 22 }
          },
          {
            path: "honor",
            name: "AboutHonor",
            component: Article,
            meta: { type: 24 }
          }
        ]
      },
      {
        path: "technology",
        name: "Technology",
        children: [
          {
            path: "banner",
            name: "TechnologyBanner",
            component: Article,
            meta: { type: 11 }
          },
          {
            path: "content",
            name: "TechnologyContent",
            component: Article,
            meta: { type: 12 }
          }
        ]
      },
      {
        path: "products",
        name: "Products",
        children: [
          {
            path: "banner",
            name: "ProductsBanner",
            component: Article,
            meta: { type: 5 }
          },
          {
            path: "content",
            name: "ProductsContent",
            component: Article,
            meta: { type: 6 }
          }
        ]
      },
      {
        path: "medicalProfessionals",
        name: "medicalProfessionals",
        children: [
          {
            path: "banner",
            name: "MedicalProfessionalsBanner",
            component: Article,
            meta: { type: 25 }
          },
          {
            path: "content",
            name: "MedicalProfessionalsContent",
            component: Article,
            meta: { type: 26 }
          }
        ]
      },
      {
        path: "partners",
        name: "Partners",
        children: [
          {
            path: "banner",
            name: "PartnersBanner",
            component: Article,
            meta: { type: 7 }
          },
          {
            path: "content",
            name: "PartnersContent",
            component: Article,
            meta: { type: 8 }
          }
        ]
      },
      {
        path: "investors",
        name: "Investors",
        children: [
          {
            path: "banner",
            name: "InvestorsBanner",
            component: Article,
            meta: { type: 13 }
          },
          {
            path: "content",
            name: "InvestorsContent",
            component: Article,
            meta: { type: 14 }
          }
        ]
      },
      {
        path: "team",
        name: "Team",
        children: [
          {
            path: "banner",
            name: "TeamBanner",
            component: Article,
            meta: { type: 9 }
          },
          {
            path: "content",
            name: "TeamContent",
            component: TeamsInfo,
            meta: { type: 10 }
          }
        ]
      },
      {
        path: "hireinfo",
        name: "HireInfo",
        children: [
          {
            path: "banner",
            name: "HireInfoBanner",
            component: Article,
            meta: { type: 17 }
          },
          {
            path: "content",
            name: "HireInfoContent",
            component: HireInfo,
            meta: { type: 18 }
          }
        ]
      },
      {
        path: "mainPart",
        name: "MainPart",
        children: [
          {
            path: "banner",
            name: "MainPartBanner",
            component: Article,
            meta: { type: 1 }
          },
          {
            path: "content",
            name: "MainPartContent",
            component: MainPart,
            meta: { type: 2 }
          }
        ]
      },
      {
        path: "teamsInfo",
        name: "TeamsInfo",
        children: [
          {
            path: "banner",
            name: "TeamsInfoBanner",
            component: Article,
            meta: { type: 9 }
          },
          {
            path: "content",
            name: "TeamsInfoContent",
            component: TeamsInfo,
          }
        ]
      },
      {
        path: "contact",
        name: "Contact",
        children: [
          {
            path: "banner",
            name: "ContactBanner",
            component: Article,
            meta: { type: 19 }
          },
          {
            path: "content",
            name: "ContactContent",
            component: Article,
            meta: { type: 20 }
          }
        ]
      },
      {
        path: "news",
        name: "News",
        children: [
          {
            path: "banner",
            name: "NewsBanner",
            component: Article,
            meta: { type: 15 }
          },
          {
            path: "content",
            name: "NewsContent",
            component: Article,
            meta: { type: 16 }
          }
        ]
      }
    ]
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router